import logging
from baidu import baidu_search
from fastapi import FastAPI

app = FastAPI()

@app.get('/')
async def search(wd: str, pageNum:int=0, pageSize:int=5, tn:str=None):
    return await baidu_search(wd, pageNum=pageNum, pageSize=pageSize, tn=tn)


